Trigger Function can be created with PL/pgSQL and referenced within a PostgreSQL trigger definition. The term "trigger function" is a simply a way of referring to a function that is intended to be invoked by a trigger. Triggers define operations that are performed when a specific event occurs within the database. A PL/pgSQL trigger function can be referenced by a trigger as the operation to be performed when the trigger's event occurs.
The definition of a trigger and the definition of its associated trigger function are two different things. A trigger is defined with the SQL CREATE TRIGGER command, whereas trigger functions are defined using the SQL CREATE FUNCTION command.
See Triggers for details.
Just simply click ->
Trigger Function to open an object
pane for Trigger Function. A control-click displays the popup menu
or using the object pane toolbar below, allowing you to create new, edit and
delete the selected trigger function.
Create Trigger Function
To create a new trigger function
- Select anywhere on the object pane.
- Click the
from the object pane toolbar.
or - Control-click and select New Trigger Function from the popup menu.
- Edit trigger function properties on the appropriate tabs of the Trigger Function Designer.
To create a new trigger function with modification as one of the existing trigger function
- Select the trigger function for modifying in the object pane.
- Control-click and select the Design
Trigger Function from the popup menu or simply double-click the trigger function.
or - Click the
from the object pane toolbar.
- Modify trigger function properties on the appropriate tabs of the Trigger Function Designer.
- Click
Save As.
To edit the existing trigger function(manage its properties, advanced, etc)
- Select the trigger function for editing in the object pane.
- Control-click and select the Design
Trigger Function from the popup menu or simply double-click the trigger function.
or - Click the
from the object pane toolbar.
- Edit trigger function properties on the appropriate tabs of the Trigger Function Designer.
To change the name of the trigger function
- Select the trigger function for editing in the object pane.
- Control-click and select the Rename from the popup menu.
Delete Trigger Function
To delete a trigger function
- Select the trigger function for deleting in the object pane.
- Control-click and select the Delete Trigger Function
from the popup menu.
or - Click the
from the object pane toolbar.
- Confirm deleting in the dialog window.
Achieve Trigger Function Information
To achieve a trigger function information
- Select the trigger function in the navigation pane/object pane.
- Choose View -> Object Information in the main menu.
or - Click the
from the object pane toolbar.